import { NumberIdRecordModel, OrderType, User } from '$/client'
import { Model, type Mutable } from '../client-core'

export class TopupIn extends Model {
  description?: string
  amount: string = '0'
  gift: string = '0'
}

export class OrderIn extends Model {
  copilot: number = 0
  description?: string
  type: OrderType = OrderType.NONE
  price: number = 0
  duration: number = 0
}

export class Comment extends NumberIdRecordModel {
  copilot: number = 0
  userId: number = 0
  user: User = User.inst()
  content: string = ''

  initialize(data: Mutable<this>): void {
    data.user = User.inst(data.user)
    super.initialize(data)
  }
}

export class CommentIn extends Model {
  copilot: number = 0
  content: string = ''
}
